#include "CubeApp.h"

CubeApp::CubeApp() {
	angle = 0;
}

void CubeApp::display() {
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glFrustum(-16, 16, -16, 16, 32, 4096);
	
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();

	glTranslated(0, 0, -64);
	glRotated(angle, 0, 1, 0);

	glutWireCube(16);
}

void CubeApp::timer() {
	++angle;
}
